import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  base: process.env.BASE_URL,
  routes: [
    {
      path:'/',
      component:()=>import('@/views/login.vue')
    },
    
    {
      path:'/page',
      component:()=>import('@/views/page.vue'),
      children:[
        {
          path: '/',
          component: () => import('@/components/main'),
        },
      {
        path: '/main',
        component: () => import('@/components/main'),
      },
      {
        path: '/device_info',
        component: () => import('@/components/device_info'),
      },
      {
        path: '/parts_info',
        component: () => import('@/components/parts_info'),
      },
      {
        path:'/user_info',
        component:()=>import('@/components/user_info'),
      },
      {
        path:'/system_parameter',
        component:()=>import('@/components/system_parameter'),
        
      },
      {
        path:'/analyzeInfo',
        component:()=>import('@/components/analyzeInfo'),
        
      },
      {
        path:'/runtime',
        component:()=>import('@/components/runtime'),
      },
      {
        path:'/updata',
        component:()=>import('@/components/updata'),
      },
      {
        path:'/alarm_info',
        component:()=>import('@/components/alarm_info'),
      },
      {
        path:'/collect_info',
        component:()=>import('@/components/collect_info'),
      },
      //农场管理相关组件
      {
        path:'/farm_info',
        component:()=>import('@/components/farm/site_info'),
      },
      {
        path:'/site_info',
        component:()=>import('@/components/farm/site_info'),
      },
      {
        path:'/product_info',
        component:()=>import('@/components/farm/product_info'),
      },
    //任务管理相关组件
    {
      path:'/task/taskmanager',
      component:()=>import('../components/taskmanager/task')
    },
    {
      path:'/task/DP_Library',
      component:()=>import('../components/taskmanager/Data_Processing_Library')
    },
    {
      path:'/task/Model_file',
      component:()=>import('../components/taskmanager/Model_file')
    },
    {
      path:'/task/IA_Library',
      component:()=>import('../components/taskmanager/Intelligent_Analysis_Library')
    }
    ]
    }
  ]
})
